﻿using System;
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;

namespace CodeCounsel.SharePoint.RibbonDesigner.Model
{
    [XName("Ribbon", Namespaces.CommandUIText)]
    public class Ribbon
        : NamedDomainElement
    {
        public TabContainer Tabs
        {
            get { return Children.OfType<TabContainer>().FirstOrDefault(); }
        }

        public Ribbon(XElement dataModel, DomainModelSource source)
            : base(dataModel, source)
        {
        }

        public Ribbon()
        {
            Children.Add(new TabContainer());
        }
    }
}